//
//  HODefaultImage.m
//  WeiDu_1_0
//
//  Created by foguo-mac-1 on 1/12/16.
//  Copyright © 2016 ShenOu. All rights reserved.
//

#import "HODefaultImage.h"

static HODefaultImage *_instance;
@interface HODefaultImage()
{
}

@property(nonatomic, retain)UIImage *nextImg;
@property(nonatomic, strong) NSMutableArray *recordingIndicateImgArray;

@property(nonatomic, strong) NSMutableArray *audioFromMySentIndicateImgArray;
@property(nonatomic, strong) NSMutableArray *prelistenImgArr;
@end

@implementation HODefaultImage

+ (HODefaultImage *)getInstance
{
	if(_instance == nil)
	{
		_instance = [[HODefaultImage alloc]init];
	}
	return _instance;
}

- (UIImage *)getNextImg
{
	if(!self.nextImg)
		self.nextImg = [UIImage imageNamed:@"icon_go"];
	return self.nextImg;
}

- (NSArray *)getAudioIndicateImgArray
{
	if(self.audioFromMySentIndicateImgArray == nil)
	{
		self.audioFromMySentIndicateImgArray = [[[NSMutableArray alloc]init] autorelease];
		[self.audioFromMySentIndicateImgArray addObject:[UIImage imageNamed:@"baoxiuxiangqing_yinpin_3"]];
		[self.audioFromMySentIndicateImgArray addObject:[UIImage imageNamed:@"baoxiuxiangqing_yinpin_2"]];
		[self.audioFromMySentIndicateImgArray addObject:[UIImage imageNamed:@"baoxiuxiangqing_yinpin_1"]];
		[self.audioFromMySentIndicateImgArray addObject:[UIImage imageNamed:@"baoxiuxiangqing_yinpin_2"]];
		
	}
	return self.audioFromMySentIndicateImgArray;
}

- (NSArray *)getPrelistenImgArr
{
	if (self.prelistenImgArr == nil) {
		self.prelistenImgArr = [[[NSMutableArray alloc] initWithCapacity:0] autorelease];
		[self.prelistenImgArr addObject:[UIImage imageNamed:@"prelisten1"]];
		[self.prelistenImgArr addObject:[UIImage imageNamed:@"prelisten2"]];
		[self.prelistenImgArr addObject:[UIImage imageNamed:@"prelisten3"]];
	}
	return self.prelistenImgArr;
}

- (NSArray *)getRecordingIndicateImgArray
{
	if(self.recordingIndicateImgArray == nil)
	{
		self.recordingIndicateImgArray = [[NSMutableArray alloc]init];
		for(int i = 1; i < 8; i ++)
		{
			NSString *imgName = [NSString stringWithFormat:@"volumn_%d", i];
			UIImage *img = [UIImage imageNamed:imgName];
			if(img)
			{
				[self.recordingIndicateImgArray addObject:img];
			}
		}
	}
	return self.recordingIndicateImgArray;
}

- (void)dealloc
{
	[self.recordingIndicateImgArray removeAllObjects];
	self.recordingIndicateImgArray = nil;
	self.nextImg = nil;
	[super dealloc];
}
@end
